package com.zjjt.dc.tools.download.file;

import com.zjjt.dc.tools.download.file.action.DownloadFileAction;

import java.util.Arrays;
import java.util.List;

public class DownLoadFileDemo {
    public static void main(String[] args) {
//        String[] paths = {"https://img.li91.com/2023/07/750x1500/n0/36bab5420b261e01d561ef43b09f637d.jpg",
//                "https://img.li91.com/2023/07/750x1500/n0/c9d3a9f773da2bc7c5bf3f0be779823a.jpg",
//        "https://img.li91.com/2023/07/750x1500/n0/ee8dfb380791738362c190c5d49de0a2.jpg"};
//       new DownLoadFileAction("./download/blh").action(paths);


        List<String> pathsA = Arrays.asList(
                "https://img.li91.com/2023/07/750x1500/n0/36bab5420b261e01d561ef43b09f637d.jpg",
                "https://img.li91.com/2023/07/750x1500/n0/c9d3a9f773da2bc7c5bf3f0be779823a.jpg",
                "https://img.li91.com/2023/07/750x1500/n0/ee8dfb380791738362c190c5d49de0a2.jpg",
                "https://img.li91.com/2023/07/750x1500/n0/cd6e19b615a7b9f39ac6cf0b75beff13.jpg",
                "https://img.li91.com/2023/07/750x1500/n0/58a03252e8ea48988f49442fee84aa50.jpg",
                "https://img.li91.com/2023/07/750x1500/n0/a11fe263b3544d1cd6fb4740d1db9e16.jpg",
                "https://img.li91.com/2023/07/750x739/n0/4f0c08f3b60a59042ae1570133f147b1.jpg",
                "https://img.li91.com/2022/07/750x1500/n0/1524e839218845b3922216558689709f.jpg",
                "https://img.li91.com/2022/07/750x1500/n0/e07d3acc4efb05d4266a5ce32dab78dd.jpg",
                "https://img.li91.com/2022/07/750x1500/n0/b4cd3c304470cc96e59d4e5be236a8a8.jpg",
                "https://img.li91.com/2022/07/750x1500/n0/69fb47546fc6c909e62942e9014e4f35.jpg",
                "https://img.li91.com/2022/07/750x1500/n0/c6fbc953aba614ad1cdcbbcc63769814.jpg",
                "https://img.li91.com/2022/07/750x1093/n0/9ed3ee619935d3cee20380deb5d1b5df.jpg",
                "https://img.li91.com/2023/07/750x1500/n0/8f65dcc967f0add2106493b9f79da3bb.jpg",
                "https://img.li91.com/2023/07/750x1500/n0/1bd0881e65590da1983e2a89d7a2012c.jpg",
                "https://img.li91.com/2023/07/750x1500/n0/05ed20454d89cd5c7268b05626aeb6fb.jpg",
                "https://img.li91.com/2023/07/750x1500/n0/55b2df65e6f49c823c891bed1d56e8af.jpg",
                "https://img.li91.com/2023/07/750x1500/n0/21c55bba7aaf404e504da84ab9fa73cb.jpg",
                "https://img.li91.com/2023/07/750x1500/n0/026f7379bedce4f303f2b60903446aea.jpg",
                "https://img.li91.com/2023/07/750x1500/n0/d6773a3423805a554a31c0ffc7a21a3c.jpg",
                "https://img.li91.com/2023/07/750x318/n0/e50ceacc5d63434a4045770b836730fc.jpg",
                "https://img.li91.com/2023/06/750x1406/n0/003c57c4ff5463ffc7b6b45a508b65b9.jpg",
                "https://img.li91.com/2023/06/750x750/n0/d63c495b6d026c829972767a53eee803.jpg",
                "https://img.li91.com/d/0/1567267200/5d904e96c950b.jpg",
                "https://img.li91.com/d/0/1567267200/5d904e9a1ad20.jpg",
                "https://img.li91.com/d/0/1567267200/5d904e9ce2a07.jpg",
                "https://img.li91.com/d/0/1567267200/5d904e9fc15fc.jpg",
                "https://img.li91.com/d/0/1567267200/5d904ea312226.jpg",
                "https://img.li91.com/d/0/1567267200/5d904ea5aa4a4.jpg",
                "https://img.li91.com/d/0/1567267200/5d904ea833a7a.jpg"
        );

        List<String> pathsB = Arrays.asList(
                "https://img.li91.com/2023/07/750x1500/n0/ee8dfb380791738362c190c5d49de0a2.jpg"
        );

        // 创建不同的下载任务
        new DownloadFileAction("./download/blh/A").actionThreads(pathsA);
        new DownloadFileAction("./download/blh/B").actionThreads(pathsB);

        DownloadFileAction.close();
    }
}
